package com.wffz.config.security.service.impl;

import com.wffz.config.security.service.IAuthenticationFacade;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Component;

/**
 * @author sunlei
 * @className AuthenticationFacade
 * @Description
 * @date 2023-03-13 21:13
 **/
@Component
public class AuthenticationFacade implements IAuthenticationFacade {
    @Override
    public Authentication getAuthentication() {
        return SecurityContextHolder.getContext().getAuthentication();
    }
}
